/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ScannerParser;

/**
 *
 * @author jefoutta
 */
public class none {

    /*
        public String getCode(){
        String s = "";
        if(this.temporal == null){
            if(this.children.size() > 0 || this.typeOperator.equals("function")){
                if(this.typeOperator.equals("aritop")){
                    temporal = Temporal.getTemporal();
                    for(int i = 0; i < this.children.size(); i++){
                        s = s + this.children.get(i).getCode();
                    }
                    if(this.children.size() > 1)
                        s = s + temporal.getName()+" = "+this.children.get(0).getVal()+" "+this.element+" "+ this.children.get(1).getVal();
                    else
                        s = s + this.element+" "+this.children.get(0).getVal();
                }else{
                    if(this.typeOperator.equals("relop")){
                        temporal = Temporal.getCMP();
                        for(int i = 0; i < this.children.size(); i++){
                            s = s + this.children.get(i).getCode();
                        }
                        s = s + temporal.getName()+" = "+this.children.get(0).getVal()+" - "+this.children.get(1).getVal()+"\n";

                        if(this.parent == null){
                            if(labelTrue == null && labelFalse == null && labelNext == null){
                                labelTrue = new Label();
                                labelFalse = new Label();
                                labelNext = new Label();
                            }
                            s = s + "if "+temporal.getName()+" "+this.element+" 0 goto "+ labelTrue.getName()+"\n";
                            s = s +labelFalse.getName()+":\n"+temporal.getName()+" = "+"0\ngoto "+labelNext.getName()+"\n"+labelTrue.getName()+":\n"+temporal.getName()+" = "+"1\n"+labelNext.getName()+":";
                        }else{
                            labelTrue = this.parent.labelTrue;
                            labelFalse = this.parent.labelFalse;
                            labelNext = this.parent.labelNext;
                            if (this.parent.element.equals("||")){
                                s = s + "if "+temporal.getName()+" "+this.element+" 0 goto "+ labelTrue.getName();
                            }
                            if(this.parent.element.equals("&&")){
                                if(this.parent.childIndex == (this.parent.children.size()-1)){

                                }
                                else
                                    s = s + "ifFalse "+temporal.getName()+" "+this.element+" 0 goto "+labelFalse.getName();
                            }
                            if(this.parent.element.equals("!")){
                                s = s + "if"+temporal.getName()+" "+this.element+" 0 goto "+labelFalse.getName();
                            }
                        }
                    }else{
                        if(this.typeOperator.equals("logicop")){
                            temporal = Temporal.getCMP();
                            if(this.parent == null){
                                if(labelTrue == null && labelFalse == null && labelNext == null){
                                    labelTrue = new Label();
                                    labelFalse = new Label();
                                    labelNext = new Label();
                                }
                            }else{
                                labelTrue = this.parent.labelTrue;
                                labelFalse = this.parent.labelFalse;
                                labelNext = this.parent.labelNext;
                            }
                            for(int i = 0; i < this.children.size(); i++){
                                s = s + this.children.get(i).getCode();
                            }
                            if(!this.children.get(0).typeOperator.equals("logicop")){
                                if(this.children.size() > 1){
                                    if(!this.children.get(1).typeOperator.equals("logicop"))
                                        if(this.element.equals("||"))
                                            s = s +labelFalse.getName()+":\n"+ temporal.getName()+" = "+"0\ngoto "+labelNext.getName()+"\n"+labelTrue.getName()+":\n"+temporal.getName()+" = "+"1\n"+labelNext.getName()+":";
                                        if(this.element.equals("&&"))
                                            s = s +labelTrue.getName()+":\n"+temporal.getName()+" = "+"1\ngoto "+labelNext.getName()+"\n"+labelFalse.getName()+":\n"+temporal.getName()+" = "+"0\n"+labelNext.getName()+":";
                                }else{
                                    if(this.element.equals("!"))
                                        s = s +labelFalse.getName()+":\n"+ temporal.getName()+" = "+"0\ngoto "+labelNext.getName()+"\n"+labelTrue.getName()+":\n"+temporal.getName()+" = "+"1\n"+labelNext.getName()+":";
                                }
                            }
                        }else{
                            if(this.typeOperator.equals("function")){
                                temporal = Temporal.getTemporal();
                                for(int i = 0; i < this.children.size(); i++){
                                        s = s + this.children.get(i).getCode();
                                }
                                for(int i = 0; i < this.children.size(); i++){
                                    s = s + "param "+ this.children.get(i).getVal()+"\n";
                                }
                                if(this.children.size() > 0)
                                    s = s + temporal.getName() + " = "+"call "+this.element+", "+this.children.size();
                                else
                                    s = s + temporal.getName() + " = "+"call "+this.element+", 0";

                            }else{
                                if(this.typeOperator.equals("array")){
                                    s = s + this.children.get(0).getCode();
                                    this.offset = this.children.get(0).getVal()+"*"+symbol.width;
                                    this.element = this.getVal()+"["+this.offset+"]";
                                }else{
                                    if(this.typeOperator.equals("struct")){
                                        s = s + this.children.get(0).getCode();
                                    }
                                }
                            }
                        }
                    }
                }
            }else{
                /*if(this.typeOperator.equals("location")){
                    s = this.getVal();
                }else{
                    if(this.typeOperator.equals("array")){
                        s = this.brother.getCode();
                        s = s + this.getVal()+"["+this.brother.getVal()+"*"+symbol.width+"]";
                    }else{
                        if(this.typeOperator.equals("value")){
                            s = this.getVal();
                        }
                    }
                }*//*
                return "";
            }
        }else{
            return "";
        }
        return s+"\n";
    }
    */
}
